YambUp = {
	name: "up",
	yamb: null,
	
	init: function() {
		this.yamb.table.find("td.field[game_column="+this.name+"]").eq(12).addClass("toplay");
	},
	
	play: function(td) {
		if(this.yamb.toPlay(td)) {
			var value = this.yamb.getGameValue(td.attr("game_row"));
			td.html(value);
			td.addClass("played").removeClass("toplay");
			
			var prevRow = td.parent().prev();
			if(prevRow.hasClass("sum")) {
				prevRow = prevRow.prev();
			}
			var prev = prevRow.find("td.field[game_column="+this.name+"]");
			if(prev.length) {
				prev.addClass("toplay");
			}
			return true;
		}
		return false;
	},
	undo: function(td) {
		var prevRow = td.parent().prev();
		if(prevRow.hasClass("sum")) {
			prevRow = prevRow.next();
		}
		var prev = prevRow.find("td.field[game_column="+this.name+"]");
		if(prev.length) {
			prev.removeClass("toplay");
			td.addClass("toplay").removeClass("played");
		}
	}
};